package demo02_interface;
//测试类
public class AnimalDemo {
    public static void main(String[] args) {
        Jumpping j=new Cat();
        j.jump();
        System.out.println("~~~~~~~~~~");

        Animal a =new Cat();//向上转级
        a.setName("小花猫");
        a.setAge(5);
        System.out.println(a.getName()+","+a.getAge()+"岁");
        a.eat();
        //Cat c=(Cat) a;向下转级
        ((Cat) a).jump();

    }
}